import { createSlice } from '@reduxjs/toolkit'
import {removeAllStorage} from "../../utils/storage";
const ACTIVE_MENU_KEY = 'ACTIVE_MENU'
const LOCATION_KEY = 'LOCATION_KEY'
const THEME_KEY = 'Theme'
const AppSlice = createSlice({
    name: 'app',
    initialState: {
        theme: 'light',
        isFullScreen: false,
        needLogin: false
    },
    reducers: {
        setTheme: (state, payload) =>{
            state.theme = payload.payload
        },
        setFullScreen: state => {
            state.isFullScreen = !state.isFullScreen
        },
        setLoginStatus: (state, payload) =>{
            state.needLogin = payload.payload
        },

    }
})

export default AppSlice.reducer
export const {setFullScreen,setTheme,setLoginStatus } = AppSlice.actions
